import request from "@/utils/request.js";

/**
 * 订单列表
 * @param params
 */
export function orderListApi(params) {
	return request.get("api/admin/mer/store/order/list", params);
}
/**
 * 取消列表
 * @param id
 */
export function cancelOrderApi(id) {
	return request.post(`api/admin/store/order/cancel?id=${id}`);
}
/**
 * 订单详情
 * @param params
 */
export function orderDetailApi(params) {
	return request.get(`api/admin/mer/store/order/info`, params);
}
/**
 * 订单 立即退款
 * @param params
 */
export function orderRefundApi(params) {
	return request.get(`api/admin/mer/store/order/refund`, params);
}

/**
 * 退货
 * @param params
 */
export function orderRefundGoodsApi(params) {
	return request.post('api/admin/mer/store/order/refund/goods',params,{},true)
}

// 物流公司列表
export function expressList(data) {
  return request.get('api/admin/express/list',data)
}
/**
 * 订单 发货
 * @param params
 */
export function orderSendApi(params) {
	return request.get('api/admin/mer/store/order/send',params)
}
/**
 * 核销订单
 * @param params
 */
export function checkCodeMer(params) {
	return request.post('api/admin/mer/store/order/code/check',params,{},true)
}
/**
 * 订单 拒绝退款
 * @param params
 */
export function orderRefuseApi(params) {
	return request.get('api/admin/mer/store/order/refund/refuse',params)
}
/**
 * 修改子订单价格
 * @param params
 */
export function updateOrderPriceMer(params) {
	return request.put('api/admin/mer/store/order/updateOrderPrice',params,{},true)
}
/**
 * 确认订单
 * @param params
 */
 export function confirmChildOrderMer(params) {
	 return request.put('api/admin/mer/store/order/confirmChildOrder',params,{},true)
}
/**
 * 订单 物流列表
 * @param params
 */
 export function deliveryList(params) {
	 return request.get('api/admin/mer/store/delivery/queryDeliveryList',params)
}
/**
 * 订单 物流列表详情
 * @param params
 */
 export function deliveryQueryShowApi(params) {
	 return request.get('api/admin/mer/store/delivery/queryShowApi',params)
}
/**
 * 订单 使用平台物流
 * @param pram
 */
 export function sysDeliveryMerApi(id) {
  return request.post(`api/admin/mer/store/order/use/sysDelivery?id=${id}`)
}
/**
 * 订单 确认收货
 * @param pram
 */
 export function updateReceiptMerApi(params) {
  return request.put('api/admin/mer/store/order/confirm/receipt',params,{},true)
}
/**
 * 订单 备注
 * @param pram
 */
 export function orderMarkApiMerApi(params) {
  return request.post('api/admin/mer/store/order/note',params,{},true)
}

/**
 * 订单 云仓商品订单自主发货
 * @param pram
 */
 export function independentDelivery(params) {
  return request.put('api/admin/mer/store/order/independent/delivery',params,{},true)
}

/**
 * 线下支付确认收款
 * @param pram
 */
 export function confirmOrderOffline(params) {
	 return request.put('api/admin/mer/store/order/confirm/offline',params,{},true)
}
/**
 * 售后订单地址 列表
 * @param params
 */
 export function addressListAfterSale(params) {
	 return request.get('api/chant/mer/merchant-address/afterSale/list',params)
}